﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:GameLogic_Logic="clr-namespace:GameLogic.Logic;assembly=GameLogic"
	mc:Ignorable="d"
	x:Class="AirHockey.Phone.GameContent"
	d:DesignWidth="480" d:DesignHeight="800">

	<Canvas x:Name="LayoutRoot">
		<Canvas.Background>
			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="Black" Offset="0"/>
				<GradientStop Color="#FF766E6E" Offset="0.496"/>
				<GradientStop Color="Black" Offset="1"/>
			</LinearGradientBrush>
		</Canvas.Background>
		<Custom:Interaction.Behaviors>
			<GameLogic_Logic:GameLoop/>
		</Custom:Interaction.Behaviors>
		<Ellipse x:Name="_ball" Fill="#FFF4F4F5" Height="30" Stroke="Black" Width="30" Canvas.Left="227" Canvas.Top="387">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:MovingCollidableBehavior AutoStart="True" Direction="90" CollisionEnabled="True" Speed="6" CollisionType="Bounce"/>
			</Custom:Interaction.Behaviors>
		</Ellipse>
		<Rectangle x:Name="_paddle" Fill="White" Height="20" Canvas.Left="198" Stroke="Black" Canvas.Top="692" Width="100" RadiusX="6" RadiusY="6">
			<Custom:Interaction.Triggers>
				<GameLogic_Logic:CollisionTrigger>
					<GameLogic_Logic:ChangeGamePropertiesAction ChangeScoresOnAction="True" ScoresIncrementValue="1"/>
				</GameLogic_Logic:CollisionTrigger>
			</Custom:Interaction.Triggers>
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
				<GameLogic_Logic:FollowMouseBehavior FollowPosition="X"/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_left" Width="10" Height="800">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_right" Height="800" Canvas.Left="470" Width="10">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_top" Height="10" Width="480">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_bottom" Height="10" Canvas.Top="790" Width="480">
			<Custom:Interaction.Triggers>
				<GameLogic_Logic:CollisionTrigger>
					<GameLogic_Logic:ChangeGamePropertiesAction ChangeLivesOnAction="True" LivesIncrementValue="-1"/>
				</GameLogic_Logic:CollisionTrigger>
			</Custom:Interaction.Triggers>
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
	</Canvas>
</UserControl>